@import "~antd/lib/style/themes/default.less";

@pro-header-hover-bg: rgba(0, 0, 0, 0.025);

.header {
	position: relative;
	height: @layout-header-height;
	padding: 0;
	background: #000000;
	box-shadow: 0 1px 4px rgba(206, 206, 206, 0.25);
  width: max-content;
  min-width: 100%;
}

.logo {
	margin-right: 46px;
	display: inline-block;
	height: @layout-header-height;
	padding: 0 0 0 24px;
	font-size: 20px;
	line-height: @layout-header-height;
	vertical-align: top;
	cursor: pointer;

	img {
		display: inline-block;
		vertical-align: middle;
	}
}

.menu {
	:global(.anticon) {
		margin-right: 8px;
	}

	:global(.ant-dropdown-menu-item) {
		min-width: 160px;
	}
}

.trigger {
	height: @layout-header-height;
	padding:~"calc((@{layout-header-height} - 20px) / 2)" 24px;
	font-size: 20px;
	cursor: pointer;
	transition: all 0.3s, padding 0s;

	&:hover {
		background: @pro-header-hover-bg;
	}
}

.right {
	float: right;
	height: 100%;
	overflow: hidden;

	.action {
		display: inline-block;
		height: 100%;
		padding: 0 12px;
		cursor: pointer;
		transition: all 0.3s;
		color: #ffffff;

		>i {
			color: #ffffff;
			vertical-align: middle;
		}

		&:hover {
			background: @pro-header-hover-bg;
		}

		&:global(.opened) {
			background: @pro-header-hover-bg;
		}
	}

	.search {
		padding: 0 12px;

		&:hover {
			background: transparent;
		}
	}

	.account {
		.avatar {
			margin:~"calc((@{layout-header-height} - 24px) / 2)" 0;
			margin-right: 8px;
			color: @primary-color;
			vertical-align: top;
			background: rgba(255, 255, 255, 0.85);
		}
	}
}

.dark {
	height: @layout-header-height;

	.action {
		color: rgba(255, 255, 255, 0.85);

		>i {
			color: rgba(255, 255, 255, 0.85);
		}

		&:hover,
		&:global(.opened) {
			background: @primary-color;
		}

		:global(.ant-badge) {
			color: rgba(255, 255, 255, 0.85);
		}
	}
}

@media only screen and (max-width: @screen-md) {
	.header {
		:global(.ant-divider-vertical) {
			vertical-align: unset;
		}

		.name {
			display: none;
		}

		i.trigger {
			padding: 22px 12px;
		}

		.logo {
			position: relative;
			padding-right: 12px;
			padding-left: 12px;
		}

		.right {
			position: absolute;
			top: 0;
			right: 12px;
			background: #fff;

			.account {
				.avatar {
					margin-right: 0;
				}
			}
		}
	}
}

.nav {
	position: relative;
	margin-left: 20px;

	span {
		line-height: 56px;
    font-size: 14px;
    margin-right: 20px;
    padding: 15px 10px;
		&:first-child {
			a {
				border-left: none;
			}
		}

		a {
			color: #ffffff;
			// border-left: 1px solid #e8e8e8;
			padding: 0 ;
      line-height: 22px;
		}
	}

	.active {
    border-bottom: 2px solid #3e5bff;
	}
}

@media only screen and (max-width: 1024px) {
	.header {
		:global(.ant-divider-vertical) {
			vertical-align: unset;
		}

		.name {
			// display: none;
		}

		i.trigger {
			padding: 22px 12px;
		}

		.logo {
			position: relative;
			padding-right: 12px;
			padding-left: 12px;
		}

		.right {
			// position: absolute;
			// top: 0;
			// right: 12px;
			// background: #fff;

			.account {
				.avatar {
					margin-right: 0;
				}
			}
		}
    .nav{
      span{
        font-size: 15px;
        a{
          padding: 0 15px !important;
        }
      }
    }
    .logo{
      margin-right: 24px;
    }
	}
}